var router = require("koa-router")();
var depService = require("../service/DepService");
router.get("/getAll", async (ctx)=>{

      var result =await  depService.getAll2();
      ctx.body = result;

});

router.get("/fenye", async (ctx)=>{
      var page = ctx.query.page;
      var size = ctx.query.size;
      var result = await  depService.fenye(page,size);
      ctx.body = result;
});

router.get("/hello", async (ctx)=>{

      ctx.body = "Hello,Koa!!!";

});

module.exports = router;
